Integrand size = 31, antiderivative size = 76 \[ \int \frac {a+b x^2}{x^3 \sqrt {-c+d x} \sqrt {c+d x}} \, dx=\frac {a \sqrt {-c+d x} \sqrt {c+d x}}{2 c^2 x^2}+\frac {\left (2 b c^2+a d^2\right ) \arctan \left (\frac {\sqrt {-c+d x} \sqrt {c+d x}}{c}\right )}{2 c^3} \]
1/2*(a*d^2+2*b*c^2)*arctan((d*x-c)^(1/2)*(d*x+c)^(1/2)/c)/c^3+1/2*a*(d*x-c )^(1/2)*(d*x+c)^(1/2)/c^2/x^2
Time = 0.19 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.92 \[ \int \frac {a+b x^2}{x^3 \sqrt {-c+d x} \sqrt {c+d x}} \, dx=\frac {\frac {a c \sqrt {-c+d x} \sqrt {c+d x}}{x^2}+2 \left (2 b c^2+a d^2\right ) \arctan \left (\frac {\sqrt {-c+d x}}{\sqrt {c+d x}}\right )}{2 c^3} \]
((a*c*Sqrt[-c + d*x]*Sqrt[c + d*x])/x^2 + 2*(2*b*c^2 + a*d^2)*ArcTan[Sqrt[ -c + d*x]/Sqrt[c + d*x]])/(2*c^3)
Time = 0.22 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {956, 103, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {a+b x^2}{x^3 \sqrt {d x-c} \sqrt {c+d x}} \, dx\) |
\(\Big \downarrow \) 956 |
\(\displaystyle \frac {1}{2} \left (\frac {a d^2}{c^2}+2 b\right ) \int \frac {1}{x \sqrt {d x-c} \sqrt {c+d x}}dx+\frac {a \sqrt {d x-c} \sqrt {c+d x}}{2 c^2 x^2}\) |
\(\Big \downarrow \) 103 |
\(\displaystyle \frac {1}{2} d \left (\frac {a d^2}{c^2}+2 b\right ) \int \frac {1}{d c^2+d (d x-c) (c+d x)}d\left (\sqrt {d x-c} \sqrt {c+d x}\right )+\frac {a \sqrt {d x-c} \sqrt {c+d x}}{2 c^2 x^2}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\left (\frac {a d^2}{c^2}+2 b\right ) \arctan \left (\frac {\sqrt {d x-c} \sqrt {c+d x}}{c}\right )}{2 c}+\frac {a \sqrt {d x-c} \sqrt {c+d x}}{2 c^2 x^2}\) |
(a*Sqrt[-c + d*x]*Sqrt[c + d*x])/(2*c^2*x^2) + ((2*b + (a*d^2)/c^2)*ArcTan [(Sqrt[-c + d*x]*Sqrt[c + d*x])/c])/(2*c)
3.4.65.3.1 Defintions of rubi rules used
Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_ ))), x_] :> Simp[b*f Subst[Int[1/(d*(b*e - a*f)^2 + b*f^2*x^2), x], x, Sq rt[a + b*x]*Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[2*b*d *e - f*(b*c + a*d), 0]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((e_.)*(x_))^(m_.)*((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.) *(x_)^(non2_.))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^( m + 1)*(a1 + b1*x^(n/2))^(p + 1)*((a2 + b2*x^(n/2))^(p + 1)/(a1*a2*e*(m + 1 ))), x] + Simp[(a1*a2*d*(m + 1) - b1*b2*c*(m + n*(p + 1) + 1))/(a1*a2*e^n*( m + 1)) Int[(e*x)^(m + n)*(a1 + b1*x^(n/2))^p*(a2 + b2*x^(n/2))^p, x], x] /; FreeQ[{a1, b1, a2, b2, c, d, e, p}, x] && EqQ[non2, n/2] && EqQ[a2*b1 + a1*b2, 0] && (IntegerQ[n] || GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || ( LtQ[n, 0] && GtQ[m + n, -1])) && !ILtQ[p, -1]
Time = 4.23 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.62
method | result | size |
risch | \(-\frac {a \left (-d x +c \right ) \sqrt {d x +c}}{2 c^{2} x^{2} \sqrt {d x -c}}-\frac {\left (a \,d^{2}+2 b \,c^{2}\right ) \ln \left (\frac {-2 c^{2}+2 \sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}}{x}\right ) \sqrt {\left (d x -c \right ) \left (d x +c \right )}}{2 c^{2} \sqrt {-c^{2}}\, \sqrt {d x -c}\, \sqrt {d x +c}}\) | \(123\) |
default | \(-\frac {\sqrt {d x -c}\, \sqrt {d x +c}\, \left (\ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) a \,d^{2} x^{2}+2 \ln \left (-\frac {2 \left (c^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\right )}{x}\right ) b \,c^{2} x^{2}-\sqrt {-c^{2}}\, \sqrt {d^{2} x^{2}-c^{2}}\, a \right )}{2 c^{2} \sqrt {d^{2} x^{2}-c^{2}}\, x^{2} \sqrt {-c^{2}}}\) | \(158\) |
-1/2*a*(-d*x+c)*(d*x+c)^(1/2)/c^2/x^2/(d*x-c)^(1/2)-1/2/c^2*(a*d^2+2*b*c^2 )/(-c^2)^(1/2)*ln((-2*c^2+2*(-c^2)^(1/2)*(d^2*x^2-c^2)^(1/2))/x)*((d*x-c)* (d*x+c))^(1/2)/(d*x-c)^(1/2)/(d*x+c)^(1/2)
Time = 0.27 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.96 \[ \int \frac {a+b x^2}{x^3 \sqrt {-c+d x} \sqrt {c+d x}} \, dx=\frac {2 \, {\left (2 \, b c^{2} + a d^{2}\right )} x^{2} \arctan \left (-\frac {d x - \sqrt {d x + c} \sqrt {d x - c}}{c}\right ) + \sqrt {d x + c} \sqrt {d x - c} a c}{2 \, c^{3} x^{2}} \]
1/2*(2*(2*b*c^2 + a*d^2)*x^2*arctan(-(d*x - sqrt(d*x + c)*sqrt(d*x - c))/c ) + sqrt(d*x + c)*sqrt(d*x - c)*a*c)/(c^3*x^2)
Timed out. \[ \int \frac {a+b x^2}{x^3 \sqrt {-c+d x} \sqrt {c+d x}} \, dx=\text {Timed out} \]
Time = 0.35 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.79 \[ \int \frac {a+b x^2}{x^3 \sqrt {-c+d x} \sqrt {c+d x}} \, dx=-\frac {b \arcsin \left (\frac {c}{d {\left | x \right |}}\right )}{c} - \frac {a d^{2} \arcsin \left (\frac {c}{d {\left | x \right |}}\right )}{2 \, c^{3}} + \frac {\sqrt {d^{2} x^{2} - c^{2}} a}{2 \, c^{2} x^{2}} \]
-b*arcsin(c/(d*abs(x)))/c - 1/2*a*d^2*arcsin(c/(d*abs(x)))/c^3 + 1/2*sqrt( d^2*x^2 - c^2)*a/(c^2*x^2)
Leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (64) = 128\).
Time = 0.31 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.86 \[ \int \frac {a+b x^2}{x^3 \sqrt {-c+d x} \sqrt {c+d x}} \, dx=-\frac {\frac {{\left (2 \, b c^{2} d + a d^{3}\right )} \arctan \left (\frac {{\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}}{2 \, c}\right )}{c^{3}} + \frac {2 \, {\left (a d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{6} - 4 \, a c^{2} d^{3} {\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{2}\right )}}{{\left ({\left (\sqrt {d x + c} - \sqrt {d x - c}\right )}^{4} + 4 \, c^{2}\right )}^{2} c^{2}}}{d} \]
-((2*b*c^2*d + a*d^3)*arctan(1/2*(sqrt(d*x + c) - sqrt(d*x - c))^2/c)/c^3 + 2*(a*d^3*(sqrt(d*x + c) - sqrt(d*x - c))^6 - 4*a*c^2*d^3*(sqrt(d*x + c) - sqrt(d*x - c))^2)/(((sqrt(d*x + c) - sqrt(d*x - c))^4 + 4*c^2)^2*c^2))/d
Time = 12.13 (sec) , antiderivative size = 457, normalized size of antiderivative = 6.01 \[ \int \frac {a+b x^2}{x^3 \sqrt {-c+d x} \sqrt {c+d x}} \, dx=\frac {a\,{\left (-c\right )}^{3/2}\,d^2\,\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )}{2\,c^{9/2}}-\frac {b\,\sqrt {-c}\,\left (\ln \left (\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+1\right )-\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )\right )}{c^{3/2}}-\frac {a\,{\left (-c\right )}^{3/2}\,d^2\,\ln \left (\frac {\sqrt {c+d\,x}-\sqrt {c}}{\sqrt {-c}-\sqrt {d\,x-c}}\right )}{2\,c^{9/2}}-\frac {\frac {a\,{\left (-c\right )}^{3/2}\,d^2}{32\,c^{9/2}}+\frac {a\,{\left (-c\right )}^{3/2}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{16\,c^{9/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}-\frac {15\,a\,{\left (-c\right )}^{3/2}\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{32\,c^{9/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}}{\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2}+\frac {2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^4}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^4}+\frac {{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^6}{{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^6}}+\frac {a\,d^2\,{\left (\sqrt {c+d\,x}-\sqrt {c}\right )}^2}{32\,{\left (-c\right )}^{3/2}\,c^{3/2}\,{\left (\sqrt {-c}-\sqrt {d\,x-c}\right )}^2} \]
(a*(-c)^(3/2)*d^2*log(((c + d*x)^(1/2) - c^(1/2))^2/((-c)^(1/2) - (d*x - c )^(1/2))^2 + 1))/(2*c^(9/2)) - (b*(-c)^(1/2)*(log(((c + d*x)^(1/2) - c^(1/ 2))^2/((-c)^(1/2) - (d*x - c)^(1/2))^2 + 1) - log(((c + d*x)^(1/2) - c^(1/ 2))/((-c)^(1/2) - (d*x - c)^(1/2)))))/c^(3/2) - (a*(-c)^(3/2)*d^2*log(((c + d*x)^(1/2) - c^(1/2))/((-c)^(1/2) - (d*x - c)^(1/2))))/(2*c^(9/2)) - ((a *(-c)^(3/2)*d^2)/(32*c^(9/2)) + (a*(-c)^(3/2)*d^2*((c + d*x)^(1/2) - c^(1/ 2))^2)/(16*c^(9/2)*((-c)^(1/2) - (d*x - c)^(1/2))^2) - (15*a*(-c)^(3/2)*d^ 2*((c + d*x)^(1/2) - c^(1/2))^4)/(32*c^(9/2)*((-c)^(1/2) - (d*x - c)^(1/2) )^4))/(((c + d*x)^(1/2) - c^(1/2))^2/((-c)^(1/2) - (d*x - c)^(1/2))^2 + (2 *((c + d*x)^(1/2) - c^(1/2))^4)/((-c)^(1/2) - (d*x - c)^(1/2))^4 + ((c + d *x)^(1/2) - c^(1/2))^6/((-c)^(1/2) - (d*x - c)^(1/2))^6) + (a*d^2*((c + d* x)^(1/2) - c^(1/2))^2)/(32*(-c)^(3/2)*c^(3/2)*((-c)^(1/2) - (d*x - c)^(1/2 ))^2)